//
//  QDHomeItemView.m
//  qidianchelian
//
//  Created by 冯贺 on 2018/4/18.
//  Copyright © 2018年 冯贺. All rights reserved.
//

#import "QDHomeItemView.h"

@implementation QDHomeItemView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self setUI];
    }
    return self;
}
-(void)setUI{
    _titleL = [[UILabel alloc]initWithTitle:@"" font:17*bili color:kBlackColor];
    [self addSubview:_titleL];
    
    _contentL = [[UILabel alloc]initWithTitle:@"" font:14*bili color:kLabelColor];
    [self addSubview:_contentL];
    
    _iconImage = [[UIImageView alloc]init];
    [self addSubview:_iconImage];
    
    _titleL.sd_layout
    .leftSpaceToView(self, 10)
    .topSpaceToView(self, 40*bili)
    .heightIs(15);
    [_titleL setSingleLineAutoResizeWithMaxWidth:(100)];
    
    _contentL.sd_layout
    .leftEqualToView(_titleL)
    .topSpaceToView(_titleL, 15*bili)
    .heightIs(10);
    [_contentL setSingleLineAutoResizeWithMaxWidth:(100)];
    
    _iconImage.sd_layout
    .rightSpaceToView(self, 10*bili)
    .centerYEqualToView(self)
    .widthIs(60*bili)
    .heightEqualToWidth();
    
}
@end
